///////////////////////////////////////////////////
/// tototoy Code
/// $Id: character.cc 36 2009-10-13 13:34:25Z tonyjobmails $
/// $Date: 2009-10-13 13:34:25 +0000 (Tue, 13 Oct 2009) $
/// $Author: tonyjobmails $
/// $Revision: 36 $
/// E-mail: tonyjobmails@gmail.com
/// filename: character.cc
/// function: 字符结构
///////////////////////////////////////////////////

#include <iostream>
#include "character.h"

namespace tototoy
{
	/// 重载==操作符
	bool _character_type::operator == (_character_type const &op_data)
	{
		if(this->data == op_data.data) return true;
		else return false;
	}

	/// 重载=操作符
	_character_type _character_type::operator = (_character_type const &op_data)
	{
		this->data = op_data.data;
		this->emotion = op_data.emotion;
		return *this;
	}

	/// 重载<操作符
	bool _character_type::operator < (_character_type const &op_data)
	{
		if(this->data < op_data.data) return true;
		else return false;
	}

	/// 重载>操作符
	bool _character_type::operator > (_character_type const &op_data)
	{
		if(this->data > op_data.data) return true;
		else return false;
	}

	std::ostream& operator << (std::ostream &output, _character_type const & op_data)
	{
		output << op_data.data;
		return output;
	}
};

